class AccessEntity {
  int? id;
  String? leagueName;
  String? matchTime;
  String? matchNo;
  String? homeName;
  String? homeLogo;
  String? homeRanking;
  String? guestName;
  String? guestLogo;
  String? guestRanking;
  String? status;
  String? aiResult;
  List<Options>? aiOption;
  String? homeScore90;
  String? guestScore90;
  int? level;

  AccessEntity(
      {this.id,
        this.leagueName,
        this.matchTime,
        this.matchNo,
        this.homeName,
        this.homeLogo,
        this.homeRanking,
        this.guestName,
        this.guestLogo,
        this.guestRanking,
        this.status,
        this.aiResult,
        this.aiOption,
        this.homeScore90,
        this.guestScore90,
        this.level});

  AccessEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    leagueName = json['leagueName'];
    matchTime = json['matchTime'];
    matchNo = json['ref'];
    homeName = json['homeName'];
    homeLogo = json['homeLogo'];
    homeRanking = json['homeRank'];
    guestName = json['guestName'];
    guestLogo = json['guestLogo'];
    guestRanking = json['guestRank'];
    status = json['status'];
    aiResult = json['tag'];
    if (json['advise'] != null) {
      aiOption = <Options>[];
      json['advise'].forEach((v) {
        aiOption!.add(new Options.fromJson(v));
      });
    }
    homeScore90 = json['homeScore90'];
    guestScore90 = json['guestScore90'];
    level = json['level'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['leagueName'] = this.leagueName;
    data['matchTime'] = this.matchTime;
    data['ref'] = this.matchNo;
    data['homeName'] = this.homeName;
    data['homeLogo'] = this.homeLogo;
    data['homeRank'] = this.homeRanking;
    data['guestName'] = this.guestName;
    data['guestLogo'] = this.guestLogo;
    data['guestRank'] = this.guestRanking;
    data['status'] = this.status;
    data['tag'] = this.aiResult;
    if (this.aiOption != null) {
      data['advise'] = this.aiOption!.map((v) => v.toJson()).toList();
    }
    data['homeScore90'] = this.homeScore90;
    data['guestScore90'] = this.guestScore90;
    data['level'] = this.level;
    return data;
  }
}

class Options {
  String? title;
  String? odds;

  Options({this.title, this.odds});

  Options.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    odds = json['odds'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    data['odds'] = this.odds;
    return data;
  }
}